Allow submodules to be ignored in is_dirty#294
Merged
Byron merged 1 commit intogitpython-developers:masterfrom Jun 10, 2015
Merged
Allow submodules to be ignored in is_dirty#294Byron merged 1 commit intogitpython-developers:masterfrom
Byron merged 1 commit intogitpython-developers:masterfrom
Conversation
There are cases when might not consider a directory dirty when a submodule has changes. Particular case was git-up stashing changes where submodules are irrelevant.
Javex
added a commit
to Javex/PyGitUp
that referenced
this pull request
Jun 5, 2015
Submodule changes cannot be stashed and thus should not be considered when stashing changes. Requires gitpython-developers/GitPython#294 to be applied first.
Byron
added a commit
that referenced
this pull request
Jun 10, 2015
* renamed `consider_submodules` to `submodules` to be in line with the existing parameters. Nowadays I would prefer the `consider_` prefix, but can't change the existing API and thus stick to the current naming scheme. * reduced amount of code in one portion to make it more maintainable. Related to #294
Member
|
Thank you very much ! |
Member
|
You can watch the development stream on youtube.
|
Author
|
The youtube thing was great :) Nice to hear some comments on the PR. You could of course have asked, even if 5 days have passed, I would have gladly made the changes. Thanks for being so quick in merging the request. |
Javex
added a commit
to Javex/PyGitUp
that referenced
this pull request
Jun 11, 2015
The pull request gitpython-developers/GitPython#294 has been merged but the API was changed slighty. This commit reflects this change so that it works again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

I had a use case with PyGitUp where I did not want submodules to be considered when asking whether a repo is dirty. This change allows that. I am a bit unsure with the "untracked_files" part: I would think that it's not necessary, as I can't imagine an untracked submodule (how would that work? Git would not see it as a submodule), but I included this change anyway. I can of course revert it if you are sure that there can't be a relevant case.
One problem though: I could not run (and thus not write) tests as even the most current tag had test failures for me on Python 2.7.
Please let me know what you think.